feat(liquidity): add LayerZero bridge adapter for Ethereum->Citrea bridging #3054
+397
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds LayerZero OFT (Omnichain Fungible Token) bridge support to the liquidity management system, enabling automated bridging of USDC, USDT, and WBTC from Ethereum Mainnet to Citrea.
Background
LayerZero is a cross-chain messaging protocol that enables seamless token transfers between blockchains. The OFT standard allows tokens to be transferred across chains while maintaining fungibility. This integration enables DFX to automatically bridge liquidity to Citrea when needed.
Changes
New Files
src/integration/blockchain/shared/evm/abi/layerzero-oft-adapter.abi.json- ABI for LayerZero OFT adapter contractssrc/subdomains/core/liquidity-management/adapters/actions/layerzero-bridge.adapter.ts- Bridge adapter implementationModified Files
src/subdomains/core/liquidity-management/enums/index.ts- AddedLAYERZERO_BRIDGEenumsrc/subdomains/core/liquidity-management/factories/liquidity-action-integration.factory.ts- Registered adaptersrc/subdomains/core/liquidity-management/liquidity-management.module.ts- Added providerImplementation Details
Supported Tokens & Contract Addresses
0xdaa289CC487Cf95Ba99Db62f791c7E2d2a4b868E0x41710804caB0974638E1504DB723D7bddec22e300x6925ccD29e3993c82a574CED4372d8737C6dbba60xF8b5983BFa11dc763184c96065D508AE1502C0300x2c01390E10e44C968B73A7BcFF7E4b4F50ba76Ed0xDF240DC08B0FdaD1d93b74d5048871232f6BEA3dSupported Commands
deposit- Bridge tokens from Ethereum to CitreaBridge Flow
Completion Check
Error Handling
OrderNotProcessableExceptionOrderNotProcessableExceptionOrderNotProcessableExceptionOrderNotProcessableExceptionOrderNotProcessableExceptionOrderFailedExceptionOrderFailedExceptionOrderFailedExceptionConfiguration
30291Known Limitations
Future Improvements
withdrawcommand for Citrea → EthereumTest Plan